package org.eggermont.hm.matrix;

import cern.colt.matrix.DoubleFactory2D;
import cern.colt.matrix.DoubleMatrix2D;

public class ReducedMatrix implements HMatrix {

    private final DoubleMatrix2D a;

    private final DoubleMatrix2D b;

    ReducedMatrix(int rows, int columns, int order) {
        this.a = DoubleFactory2D.dense.make(rows, order);
        this.b = DoubleFactory2D.dense.make(order, columns);
    }

    public DoubleMatrix2D multiply(DoubleMatrix2D x) {
        return this.a.zMult(this.b.zMult(x, null), null);
    }
}
